﻿@using BasicWebSite.RazorComponents;
@model bool;
<h1>Razor components</h1>
<div id="Greetings">
    @if (Model)
    {
        @(await Html.RenderStaticComponentAsync<Greetings>())
    }
    else
    {
        @(await Html.RenderComponentAsync<Greetings>())
    }
</div>

<div id="FetchData">
    @if (Model)
    {
        @(await Html.RenderStaticComponentAsync<FetchData>(new { StartDate = new DateTime(2019, 01, 15) }))
    }
    else
    {
        @(await Html.RenderComponentAsync<FetchData>(new { StartDate = new DateTime(2019, 01, 15) }))
    }
</div>

<div id="Routing">
    @if (Model)
    {
        @(await Html.RenderStaticComponentAsync<RouterContainer>());
    }
    else
    {
        @(await Html.RenderComponentAsync<RouterContainer>());
    }
</div>